<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    {include file="public/title" /}
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="author" content="AdminDesigns">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {include file="public/css" /}
    <style>
        .table a { color: blue;}
        dl, li { list-style:none;}
        .panel-body dt, .panel-body dd { float: left;}
        .clear {clear: both;}
        .panel-body dt { width: 7%;}
        .panel-body dd { width: 90%;}
        .panel-body dd li { float: left; min-width: 6%; padding: 0 10px;}
        .form-horizontal { padding-left: 30px;}
        .select { color: #7857ca; font-weight: bold;}
        tr img { max-width: 140px; max-height: 140px;}
    </style>
</head>
<body class="dashboard-page">

{include file="public/header" /}

<!-- Start: Main -->
<div id="main">

    <!-- Start: Sidebar -->
    <aside id="sidebar_left">
        <div class="sidebar-menu">
            <!--菜单-->
            {include file="public/menu" /}
        </div>
    </aside>

    <!-- Start: Content -->
    <section id="content_wrapper">
        <div id="topbar">
            <!--所在-->
            {include file="public/topbar" /}
        </div>
        <div id="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="panel">
                        <div class="panel-body">
                            <ul>
                                <li id="classify-lists">
                                    {volist name="classifys" id="classify"}
                                    <dl>
                                        <dt>{$classify.name}：</dt>
                                        <dd>
                                            <ul>
                                                <li><a href="javascript:;" ajax-id="{$classify.id}" {if condition="$classifyid eq $classify.id"}class="select"{/if}>全部</a></li>
                                                {if condition="$classify.son"}
                                                {volist name="$classify.son" id="son"}
                                                <li><a href="javascript:;" ajax-id="{$son.id}" {if condition="$classifyid eq $son.id"}class="select"{/if}>{$son.name}</a></li>
                                                {/volist}
                                                {/if}
                                            </ul>
                                        </dd>
                                    </dl>
                                    <dl class="clear"></dl>
                                    {/volist}
                                </li>
                            </ul>
                            <form class="form-horizontal" action="" method="get" id="form1">
                                <div class="form-group" style="margin-bottom: 0;">
                                    <div class="col-lg-5" style="line-height: 30px;">
                                        <span style="width: 25%; float: left;">
                                            <div style="float: left;">排序：</div>
                                            <select class="form-control input-sm" style="width: 80%; float: left;" name="order">
                                                <option value="1" {if condition="$order eq 1"}selected="selected"{/if}>发布时间由新到旧</option>
                                                <option value="2" {if condition="$order eq 2"}selected="selected"{/if}>收益由大到小</option>
                                            </select>
                                        </span>
                                        <input name="search_title" value="{$search_title}" class="form-control input-sm" type="text" placeholder="名称" style="width: 20%; float: left; margin: 0 20px;" />
                                        <input type="hidden" name="classifyid" id="classifyid" value="{$classifyid}" />
                                        <button type="submit" id="sub" class="btn btn-alert">搜索</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="panel">
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-bordered">
                                    <thead>
                                    <tr>
                                        <th width="240">内容名称</th>
                                        <th width="200">推广banner</th>
                                        <th width="220">内容分类</th>
                                        <th>内容售价</th>
                                        <th>推广收益</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name="lists" id="li"}
                                    <tr>
                                        <td>
                                            <a href="{$li.h5_link}" target="_blank">{$li.title}</a>
                                        </td>
                                        <td>
                                            <img src="{$li.banner}" />
                                            <a href="/index/index/download/course_id/{$li.id}">下载</a>
                                        </td>
                                        <td>{$li.classify_name}</td>
                                        <td>{$li.price}元</td>
                                        <td>{$li.generalize_earning}元</td>
                                        <td>
                                            <a href="{$li.generalize_link}" target="_blank">查看推文</a> | <a href="/index/index/create_content/course_id/{$li.id}">我要推广</a>
                                        </td>
                                    </tr>
                                    {/volist}
                                    </tbody>
                                </table>
                                {$page}
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </section>

</div>
<!-- End #Main -->
{include file="public/js" /}
<script>
    $(function(){
        $('#classify-lists a').click(function(){
            var id = $(this).attr('ajax-id');
            if (id) {
                $('#classifyid').val(id);
                $('#sub').click();
            }
        });
    });
</script>
</body>
</html>
